Additional event for jQuery processing touching to screen on touch devices.
Those who are faced with adaptation of web-based applications for mobile devices knows that the event “click” is triggered with a delay of 300ms, observe which not very pleasant. In addition, click on non-delegated place of document will not work. To solve these problems and was designed by jQuery Tap Event.
Include the plugin file on the page:
<script src="jquery.tap.js"></script>
and set an event handler as follows:
$('selector').on('tap', handler);
A noteworthy feature of plugin is a versatility. No matter where you use the tap
event: on a device with a touch screen or on a desktop computer - the handler will be executed disparately.
Triggering a click manually (e.g. $('.selector').trigger('click')
) does not trigger a tap. Likewise, triggering a tap does not trigger a click. Adapt your code to match the event expected.
Version 0.3.2, February 17, 2019:
10px
;.trigger('click')
.Version 0.3.1, February 7, 2016:
mousedown
and mouseup
events is triggering on mobile devices;Version 0.3.0, January 31, 2016:
preventDefault
handling.Version 0.2.9, June 2, 2014:
Version 0.2.8, May 27, 2014:
Version 0.2.7, March 17, 2014:
Version 0.2.6, March 14, 2014:
Version 0.2.5, November 17, 2013:
preventDefault
doesn’t worked, because the tap event constructed by mousedown/mouseup or touchstart/touchend events and they can not to be prevented.Version 0.2.4, August 22, 2013:
jTap is licensed under the MIT license.